<?php
require_once("conf/db_connection.php");

$opt_equip_size = "";
$opt_equip_size .= "<option value=''>All</option>";
$opt_equip_size .= "<option value='10'>10FTR</option>";
$opt_equip_size .= "<option value='20'>20FTR</option>";
$opt_equip_size .= "<option value='40'>40FTR</option>";

$opt_fleet = "";
$opt_fleet .= "<option value=''>All</option>";
$query_fleet = "SELECT DISTINCT(fleet_group) FROM truck WHERE is_deleted='0'";
$result_fleet = mysql_query($query_fleet) or die("SELECT EQUIPMENT SIZE ".mysql_error());
while($row_fleet = mysql_fetch_array($result_fleet))
{
	$opt_fleet .= "<option value='".$row_fleet['fleet_group']."'>".$row_fleet['fleet_group'] ."</option>";
}

$opt_stat = "";
$opt_stat .= "<option value=''>All</option>";
$opt_stat .= "<option value='queue'>Queue</option>";
$opt_stat .= "<option value='for confirmation'>For confirmation</option>";

$return_str = "<table id='pop_table' class='pop_search' border='0' style='margin:25px 25px 0px 25px; padding: 0px auto;width:350px;height:350px;background-color:#FFFFFF;'>
<thead style='height:15%;'>
<tr id='hor-minimalist-b'>
	<th colspan='8'>Advanced Search</th>
</tr>
</thead>
<tbody>
<tr>
	<td class='label'>Status:</td>
	<td class='td_input'><select id='search_stat' name='search_stat'>".$opt_stat."</select></td>
</tr>
<tr>
	<td class='label'>Size:</td>
	<td class='td_input'><select id='search_equip_size' name='search_equip_size'>".$opt_equip_size."</select></td>
</tr>
<tr>
	<td class='label'>Fleet Group:</td>
	<td class='td_input'><select id='search_fleet' name='search_fleet'>".$opt_fleet."</select></td>
</tr>
<tr>
	<td class='label'>&nbsp;</td>
	<td class='td_input'>&nbsp;</td>
</tr>
<tr>
	<td class='label'>&nbsp;</td>
	<td class='td_input' style='text-align:left'>
		<input onClick='asearch_queue2()' style='width:auto;' type='button' value='Search' />
		<input onClick='close_search()' style='width:auto;' type='button' value='Close' />
		
	</td>
</tr>
</tbody>
</table>";
echo $return_str;
?>